package com.digua.base.base

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import com.digua.base.util.CollUtil

open class ViewPagerAdapter(var fm: FragmentManager, var fragments: ArrayList<Fragment>) : FragmentPagerAdapter(fm, BEHAVIOR_SET_USER_VISIBLE_HINT) {

    override fun getCount() = CollUtil.size(fragments)

    override fun getItem(position: Int) = fragments[position]
}